#include <iostream>

int main(int argc, char const *argv[])
{
    int arr[5] = {300, 350, 200, 400, 250};
    int max = arr[0];

    for (int i = 0; i < 5; i++) {
        if (arr[i] > max) {
            max = arr[i];
        }
    }

    std::cout << "the weightest pig is " << max << " kg." << std::endl;
    return 0;
}
